<template>
  <div class="">
    <el-row>
      <el-col :span="24">
        <div class="grid-content">
          <el-breadcrumb separator="/">
            <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
            <el-breadcrumb-item>控制器</el-breadcrumb-item>
            <el-breadcrumb-item>全部</el-breadcrumb-item>
          </el-breadcrumb>
        </div>
      </el-col>
    </el-row>
    <el-row>
      <el-collapse accordion>
        <el-collapse-item title="控制器-属性" name="1">
          <template>
            <el-table :data="tableAttr" border style="width: 100%">
              <el-table-column prop="index" label="INDEX">
                <template scope="scope">
                  <span class="link" @click="getDetail(scope.row.index)">{{scope.row.index}}</span>
                </template>
              </el-table-column>
              <el-table-column prop="name" label="NAME">
                <template scope="scope">
                  <span class="link" @click="getDetail(scope.row.name)">{{scope.row.name}}</span>
                </template>
              </el-table-column>
              <el-table-column
                prop="state"
                label="STATE">
              </el-table-column>
              <el-table-column
                prop="primary"
                label="PRIMARY">
                <template scope="scope">
                  <input type="checkbox" v-model="scope.row.primary">
                </template>
              </el-table-column>
              <el-table-column
                prop="locality"
                label="LOCALITY">
              </el-table-column>
              <el-table-column
                prop="time"
                label="UP TIME(day(hh:mm))">
              </el-table-column>
              <el-table-column
                prop="rp_id"
                label="RP ID">
                <template scope="scope">
                  <span>{{scope.row.rp_id.rp}}</span>
                  <span>{{scope.row.rp_id.id}}</span>
                </template>
              </el-table-column>
              <el-table-column
                prop="encl_index"
                label="ENCL INDEX">
              </el-table-column>
              <el-table-column
                prop="ula"
                label="ULA">
              </el-table-column>
              <el-table-column
                prop="icc"
                label="ICC">
                <template scope="scope">
                  <span>{{scope.row.icc.status}}</span>
                  <span>{{scope.row.icc.content}}</span>
                </template>
              </el-table-column>
              <el-table-column
                prop="version"
                label="FIRMWARE VERSION">
              </el-table-column>
              <el-table-column
                prop="crash_dump"
                label="CRASH DUMP">
                <template scope="scope">
                  <input type="checkbox" v-model="scope.row.crash_dump">
                </template>
              </el-table-column>
              <el-table-column
                prop="log_disk"
                label="LOG DISK">
                <template scope="scope">
                  <input type="checkbox" v-model="scope.row.log_disk">
                </template>
              </el-table-column>
            </el-table>
          </template>
        </el-collapse-item>

        <el-collapse-item title="控制器-DISK CHANNEL" name="2">
          <template>
            <el-table :data="tableAttr" border style="width: 100%">
              <el-table-column prop="index" label="INDEX">
                <template scope="scope">
                  <span class="link" @click="getDetail(scope.row.index)">{{scope.row.index}}</span>
                </template>
              </el-table-column>
              <el-table-column prop="name" label="NAME">
                <template scope="scope">
                  <span class="link" @click="getDetail(scope.row.name)">{{scope.row.name}}</span>
                </template>
              </el-table-column>
              <el-table-column
                prop="state"
                label="STATE">
              </el-table-column>
              <el-table-column
                prop="primary"
                label="PRIMARY">
                <template scope="scope">
                  <input type="checkbox" v-model="scope.row.primary">
                </template>
              </el-table-column>
              <el-table-column
                prop="locality"
                label="LOCALITY">
              </el-table-column>
              <el-table-column
                prop="time"
                label="UP TIME(day(hh:mm))">
              </el-table-column>
              <el-table-column
                prop="rp_id"
                label="RP ID">
                <template scope="scope">
                  <span>{{scope.row.rp_id.rp}}</span>
                  <span>{{scope.row.rp_id.id}}</span>
                </template>
              </el-table-column>
              <el-table-column
                prop="encl_index"
                label="ENCL INDEX">
              </el-table-column>
              <el-table-column
                prop="ula"
                label="ULA">
              </el-table-column>
              <el-table-column
                prop="icc"
                label="ICC">
                <template scope="scope">
                  <span>{{scope.row.icc.status}}</span>
                  <span>{{scope.row.icc.content}}</span>
                </template>
              </el-table-column>
              <el-table-column
                prop="version"
                label="FIRMWARE VERSION">
              </el-table-column>
              <el-table-column
                prop="crash_dump"
                label="CRASH DUMP">
                <template scope="scope">
                  <input type="checkbox" v-model="scope.row.crash_dump">
                </template>
              </el-table-column>
              <el-table-column
                prop="log_disk"
                label="LOG DISK">
                <template scope="scope">
                  <input type="checkbox" v-model="scope.row.log_disk">
                </template>
              </el-table-column>
            </el-table>
          </template>
        </el-collapse-item>

        <el-collapse-item title="控制器-ICL CHANNEL" name="3">
          <template>
            <el-table :data="tableAttr" border style="width: 100%">
              <el-table-column prop="index" label="INDEX">
                <template scope="scope">
                  <span class="link" @click="getDetail(scope.row.index)">{{scope.row.index}}</span>
                </template>
              </el-table-column>
              <el-table-column prop="name" label="NAME">
                <template scope="scope">
                  <span class="link" @click="getDetail(scope.row.name)">{{scope.row.name}}</span>
                </template>
              </el-table-column>
              <el-table-column
                prop="state"
                label="STATE">
              </el-table-column>
              <el-table-column
                prop="primary"
                label="PRIMARY">
                <template scope="scope">
                  <input type="checkbox" v-model="scope.row.primary">
                </template>
              </el-table-column>
              <el-table-column
                prop="locality"
                label="LOCALITY">
              </el-table-column>
              <el-table-column
                prop="time"
                label="UP TIME(day(hh:mm))">
              </el-table-column>
              <el-table-column
                prop="rp_id"
                label="RP ID">
                <template scope="scope">
                  <span>{{scope.row.rp_id.rp}}</span>
                  <span>{{scope.row.rp_id.id}}</span>
                </template>
              </el-table-column>
              <el-table-column
                prop="encl_index"
                label="ENCL INDEX">
              </el-table-column>
              <el-table-column
                prop="ula"
                label="ULA">
              </el-table-column>
              <el-table-column
                prop="icc"
                label="ICC">
                <template scope="scope">
                  <span>{{scope.row.icc.status}}</span>
                  <span>{{scope.row.icc.content}}</span>
                </template>
              </el-table-column>
              <el-table-column
                prop="version"
                label="FIRMWARE VERSION">
              </el-table-column>
              <el-table-column
                prop="crash_dump"
                label="CRASH DUMP">
                <template scope="scope">
                  <input type="checkbox" v-model="scope.row.crash_dump">
                </template>
              </el-table-column>
              <el-table-column
                prop="log_disk"
                label="LOG DISK">
                <template scope="scope">
                  <input type="checkbox" v-model="scope.row.log_disk">
                </template>
              </el-table-column>
            </el-table>
          </template>
        </el-collapse-item>

        <el-collapse-item title="控制器-ICL IOC" name="4">
          <template>
            <el-table :data="tableAttr" border style="width: 100%">
              <el-table-column prop="index" label="INDEX">
                <template scope="scope">
                  <span class="link" @click="getDetail(scope.row.index)">{{scope.row.index}}</span>
                </template>
              </el-table-column>
              <el-table-column prop="name" label="NAME">
                <template scope="scope">
                  <span class="link" @click="getDetail(scope.row.name)">{{scope.row.name}}</span>
                </template>
              </el-table-column>
              <el-table-column
                prop="state"
                label="STATE">
              </el-table-column>
              <el-table-column
                prop="primary"
                label="PRIMARY">
                <template scope="scope">
                  <input type="checkbox" v-model="scope.row.primary">
                </template>
              </el-table-column>
              <el-table-column
                prop="locality"
                label="LOCALITY">
              </el-table-column>
              <el-table-column
                prop="time"
                label="UP TIME(day(hh:mm))">
              </el-table-column>
              <el-table-column
                prop="rp_id"
                label="RP ID">
                <template scope="scope">
                  <span>{{scope.row.rp_id.rp}}</span>
                  <span>{{scope.row.rp_id.id}}</span>
                </template>
              </el-table-column>
              <el-table-column
                prop="encl_index"
                label="ENCL INDEX">
              </el-table-column>
              <el-table-column
                prop="ula"
                label="ULA">
              </el-table-column>
              <el-table-column
                prop="icc"
                label="ICC">
                <template scope="scope">
                  <span>{{scope.row.icc.status}}</span>
                  <span>{{scope.row.icc.content}}</span>
                </template>
              </el-table-column>
              <el-table-column
                prop="version"
                label="FIRMWARE VERSION">
              </el-table-column>
              <el-table-column
                prop="crash_dump"
                label="CRASH DUMP">
                <template scope="scope">
                  <input type="checkbox" v-model="scope.row.crash_dump">
                </template>
              </el-table-column>
              <el-table-column
                prop="log_disk"
                label="LOG DISK">
                <template scope="scope">
                  <input type="checkbox" v-model="scope.row.log_disk">
                </template>
              </el-table-column>
            </el-table>
          </template>
        </el-collapse-item>

        <el-collapse-item title="控制器-IOC" name="5">
        <template>
          <el-table :data="tableAttr" border style="width: 100%">
            <el-table-column prop="index" label="INDEX">
              <template scope="scope">
                <span class="link" @click="getDetail(scope.row.index)">{{scope.row.index}}</span>
              </template>
            </el-table-column>
            <el-table-column prop="name" label="NAME">
              <template scope="scope">
                <span class="link" @click="getDetail(scope.row.name)">{{scope.row.name}}</span>
              </template>
            </el-table-column>
            <el-table-column
              prop="state"
              label="STATE">
            </el-table-column>
            <el-table-column
              prop="primary"
              label="PRIMARY">
              <template scope="scope">
                <input type="checkbox" v-model="scope.row.primary">
              </template>
            </el-table-column>
            <el-table-column
              prop="locality"
              label="LOCALITY">
            </el-table-column>
            <el-table-column
              prop="time"
              label="UP TIME(day(hh:mm))">
            </el-table-column>
            <el-table-column
              prop="rp_id"
              label="RP ID">
              <template scope="scope">
                <span>{{scope.row.rp_id.rp}}</span>
                <span>{{scope.row.rp_id.id}}</span>
              </template>
            </el-table-column>
            <el-table-column
              prop="encl_index"
              label="ENCL INDEX">
            </el-table-column>
            <el-table-column
              prop="ula"
              label="ULA">
            </el-table-column>
            <el-table-column
              prop="icc"
              label="ICC">
              <template scope="scope">
                <span>{{scope.row.icc.status}}</span>
                <span>{{scope.row.icc.content}}</span>
              </template>
            </el-table-column>
            <el-table-column
              prop="version"
              label="FIRMWARE VERSION">
            </el-table-column>
            <el-table-column
              prop="crash_dump"
              label="CRASH DUMP">
              <template scope="scope">
                <input type="checkbox" v-model="scope.row.crash_dump">
              </template>
            </el-table-column>
            <el-table-column
              prop="log_disk"
              label="LOG DISK">
              <template scope="scope">
                <input type="checkbox" v-model="scope.row.log_disk">
              </template>
            </el-table-column>
          </el-table>
        </template>
      </el-collapse-item>

        <el-collapse-item title="控制器-PROCESSOR" name="6">
          <template>
            <el-table :data="tableAttr" border style="width: 100%">
              <el-table-column prop="index" label="INDEX">
                <template scope="scope">
                  <span class="link" @click="getDetail(scope.row.index)">{{scope.row.index}}</span>
                </template>
              </el-table-column>
              <el-table-column prop="name" label="NAME">
                <template scope="scope">
                  <span class="link" @click="getDetail(scope.row.name)">{{scope.row.name}}</span>
                </template>
              </el-table-column>
              <el-table-column
                prop="state"
                label="STATE">
              </el-table-column>
              <el-table-column
                prop="primary"
                label="PRIMARY">
                <template scope="scope">
                  <input type="checkbox" v-model="scope.row.primary">
                </template>
              </el-table-column>
              <el-table-column
                prop="locality"
                label="LOCALITY">
              </el-table-column>
              <el-table-column
                prop="time"
                label="UP TIME(day(hh:mm))">
              </el-table-column>
              <el-table-column
                prop="rp_id"
                label="RP ID">
                <template scope="scope">
                  <span>{{scope.row.rp_id.rp}}</span>
                  <span>{{scope.row.rp_id.id}}</span>
                </template>
              </el-table-column>
              <el-table-column
                prop="encl_index"
                label="ENCL INDEX">
              </el-table-column>
              <el-table-column
                prop="ula"
                label="ULA">
              </el-table-column>
              <el-table-column
                prop="icc"
                label="ICC">
                <template scope="scope">
                  <span>{{scope.row.icc.status}}</span>
                  <span>{{scope.row.icc.content}}</span>
                </template>
              </el-table-column>
              <el-table-column
                prop="version"
                label="FIRMWARE VERSION">
              </el-table-column>
              <el-table-column
                prop="crash_dump"
                label="CRASH DUMP">
                <template scope="scope">
                  <input type="checkbox" v-model="scope.row.crash_dump">
                </template>
              </el-table-column>
              <el-table-column
                prop="log_disk"
                label="LOG DISK">
                <template scope="scope">
                  <input type="checkbox" v-model="scope.row.log_disk">
                </template>
              </el-table-column>
            </el-table>
          </template>
        </el-collapse-item>
      </el-collapse>
    </el-row>
  </div>
</template>
<script>
  export default {
    name: 'controller_show',
    data () {
      return {
        msg: 'Welcome to Your Vue.js App',
        tableAttr: [{
          index: 0,
          name: 'B',
          state: 'Running',
          primary: true,
          locality: 'LOCAL',
          time: '0 days(0:32)',
          rp_id: {rp: 1, id: '0x0001fffa01d6000'},
          encl_index: 0,
          ula: '0000000s02d0s2s',
          icc: {status: 'up', content: 'DG+MSG+MAD'},
          version: '3.10.0132795',
          crash_dump: true,
          log_disk: false
        }, {
          index: 1,
          name: 'A',
          state: 'Running',
          primary: false,
          locality: 'REMOTE',
          time: '0 days(0:32)',
          rp_id: {rp: 1, id: '0x0001fffa01d6000'},
          encl_index: 2,
          ula: '0fd1f4g1ed25g4',
          icc: {status: 'up', content: 'DG+MSG+MAD'},
          version: '3.10.1547201144',
          crash_dump: false,
          log_disk: true
        }],
        tableProcessor: [
          {
            index: 0,
            controller: '0(LOCAL)',
            rp: 0,
            memory_size: 32,
            cores: 6
          },
          {
            index: 2,
            controller: '1(REMOTE)',
            rp: 0,
            memory_size: 32,
            cores: 6
          }
        ],
        tableIoc: [
          {
            index: 0,
            controller: 0,
            rp: 0,
            ioc: '00',
            type: 'SAS HBA',
            vendor: '1000',
            product: '0086',
            slot: 'InternalB',
            hw_version: 'D1',
            fw_version: '20.00.06.00',
            channels: 2
          },
          {
            index: 0,
            controller: 0,
            rp: 0,
            ioc: '00',
            type: 'SAS HBA',
            vendor: '1000',
            product: '0086',
            slot: 'InternalB',
            hw_version: 'D1',
            fw_version: '20.00.06.00',
            channels: 2
          },
          {
            index: 0,
            controller: 0,
            rp: 0,
            ioc: '00',
            type: 'SAS HBA',
            vendor: '1000',
            product: '0086',
            slot: 'InternalB',
            hw_version: 'D1',
            fw_version: '20.00.06.00',
            channels: 2
          },
          {
            index: 0,
            controller: 0,
            rp: 0,
            ioc: '00',
            type: 'SAS HBA',
            vendor: '1000',
            product: '0086',
            slot: 'InternalB',
            hw_version: 'D1',
            fw_version: '20.00.06.00',
            channels: 2
          }
        ]
      }
    }
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" rel="stylesheet/scss">

</style>
